import * as React from "react";
import {PropTypes} from "react";
import { RegisterPage } from "../root";
import {OrgSelector} from '../team/index';
import {schema as ListSchema} from './list';
import {schema as commentsSchema} from './comments';
import {schema as repliesSchema} from './replies';



RegisterPage({
    path: "feeling_tone",
    label: "互动社区",
    icon: "fa fa-comments",
    NavComponent: OrgSelector,
    NavComponentTest: ({user, location}) => user.type == 4,
    acl: 'feeling_tone:list|feeling_tone:comment|feeling_tone:replies',
    children: [
      {
        path: "list",
        label: "用户新帖",
        schema: ListSchema,
        acl: 'feeling_tone:list',
        url: "/feeling_tone/list?org_id=${org_id}"
      },

      {
        path: "comments",
        label: "回复消息",
        schema: commentsSchema,
        acl: 'feeling_tone:comment',
        url: "/feeling_tone/comments?org_id=${org_id}"
      },

      {
        path: "replies",
        label: "收到的回复",
        schema: repliesSchema,
        acl: 'feeling_tone:replies',
        url: "/feeling_tone/replies?org_id=${org_id}"
      },
    ]
  });
